package cn.cheqi.recovery.api.mapper;

import cn.cheqi.recovery.api.entity.Employee;
import cn.cheqi.recovery.api.vo.EmployeeVO;
import cn.cheqi.recovery.api.vo.OrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Robin
 * @since 2020-02-23
 */
@Repository("apiEmployeeMapper")
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 通过员工ID查出员工详情
     * @param empId
     * @return
     */
    EmployeeVO findEmpDetailById(@Param("empId") Long empId);

    /**
     * 通过员工ID查出订单详情
     * @param empId
     * @param page
     * @return
     */
    List<OrderVO> findOrdersByEmpId(@Param("empId") Long empId, Page<Employee> page);
}
